<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <script src="./vue.js"></script>
</head>

<body>
  <div id="app">
    {{name}}
    <cpn>
      <p slot="center">11111</p>
    </cpn>
    <cpn><button slot="left">选择</button></cpn>
    <cpn><i slot="right">dddddd</i></cpn>
  </div>
  <template id="cpn">
    <div>
      <slot name="left"><span>左边</span></slot>
      <slot name="center"><span>中间</span></slot>
      <slot name="right"><span>右边</span></slot>
    </div>
  </template>
  <script>
    var vm = new Vue({
      el: '#app',
      data: { name: 'Taec' },
      components: {
        cpn: {
          template: "#cpn",
        }
      }
    })
  </script>
</body>

</html>